package service.impl;

import javax.sql.DataSource;

import po.Admin;
import service.AdminService;
import dao.AdminDao;
import dao.impl.AdminDaoImpl;

public class AdminServiceImpl implements AdminService {

	private AdminDao adminDao;
	
	public AdminServiceImpl(DataSource dataSource) {
		adminDao = new AdminDaoImpl(dataSource);
	}
	
	public void add() {
		Admin admin = new Admin();
		admin.setAdminId(new Integer(2));
		admin.setName("arthur");
		admin.setPassword("duqiang");
		adminDao.add(admin);
		admin.setAdminId(new Integer(3));
		adminDao.add(admin);
	}

	public void update() {
		
	}
}
